﻿

using System.Collections.Generic;
using System.IO;

namespace WeLinkHelper.Model
{
    public class ColuddriveLink
    {
        /// <summary>
        /// 文件编号，参见获取文件上传地址响应体file_sn。
        /// </summary>
        public string file_sn { get; set; }
        /// <summary>
        /// 外链提取码。
        ///长度为1 ~20位，支持英文、数字和特殊字符!@#$^&*-+.。
        /// </summary>
        public string plain_access_code { get; set; }
        /// <summary>
        /// 外链的生效时间的毫秒值。
        ///空值表示未设置。
        /// </summary>
        public long? effective_at { get; set; }
        /// <summary>
        /// 外链的失效时间的毫秒值。
        ///空值表示未设置。
        /// </summary>
        public long? expire_at { get; set; }
        /// <summary>
        /// 扩展属性。企业型外链只有本企业用户可以访问
        ///public ：普通外链
        ///enterprise： 企业性外链。（默认）
        /// </summary>
        public string scope { get; set; } = "enterprise";
    }


    //如果好用，请收藏地址，帮忙分享。
    public class Data
    {
        /// <summary>
        /// 
        /// </summary>
        public string file_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string link_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int effective_at { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int expire_at { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string scope { get; set; }
        public string access_code { get; set; }
        public FileInfo fileInfo { get; set; }
    }

    public class ColuddriveLinkResp
    {
        /// <summary>
        /// 
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Data data { get; set; }
    }


    public class CloudDriveV1PreUploadRequest
    {
        public string name { get; set; }
        public long size { get; set; }
        public string md5 { get; set; }
        public string block_md5 { get; set; }
    }


    //如果好用，请收藏地址，帮忙分享。
    public class DataUpload
    {
        /// <summary>
        /// 
        /// </summary>
        public string file_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string upload_url { get; set; }
    }

    public class CloudDriveV1PreUploadResp
    {
        /// <summary>
        /// 
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public DataUpload data { get; set; }
    }


    public class PartsItem
    {
        /// <summary>
        /// 
        /// </summary>
        public int partId { get; set; }
    }

    public class CloudDrivePart
    {
        /// <summary>
        /// 
        /// </summary>
        public List<PartsItem> parts { get; set; }
    }

}
